home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HyperLib 1997 Winter - Disc 1
/
HYPERLIB-1997-Winter-CD1.ISO.7z
/
HYPERLIB-1997-Winter-CD1.ISO
/
オンラインウェア
/
UTIL
/
Msh 1.0.0.sit
/
Msh 1.0.0 f
/
Manual
/
MAN2N.HLP
< prev
next >
Wrap
Text File
|
1996-11-14
|
11KB
|
434 lines
/***Intro***/ DragManager Drag
Intro(2n)
【名前】
Intro - Toolbox: 新機能(man2n.hlp)
【概要】
【Inside Macintosh】
<<キーワード>>
DragManager
Drag Manager
【関連項目】
【ヘッダー】
Drag.h
/***Drag***/ DragManager
Drag(2n)
【名前】
Drag - Macintosh Toolbox ルーチン: ドラッグマネージャー
【概要】
【解説】
【Gestalt】
gestaltDragMgrAttr 'drag'
0 gestaltDragMgrPresent Drag & Drop 使えるか
1 gestaltDragMgrFloatingWind ??
2 gestaltPPCDragLibPresent ??
gestaltTEAttr 'teat'
0 gestaltTEHasGetHiliteRgn TEGetHiliteRgn() 使えるか
【ルーチン】
Install and Removing Drag Handlers
InstallTrackingHandler RemoveTrackingHandler
InstallReceiveHandler RemoveReceiveHandler
Creating and Dispose of Drag References
NewDrag DisposeDrag
Adding Drag Item Flavors
AddDragItemFlavor SetDragItemFlavorData
Providing Drag Callbakc Procedures
SetDragSendProc SetDragInputProc
SetDragDrawingProc
Performing a Drag
TrackDrag
Getting Drag Item Informations
CountDragItems GetDragItemReferenceNumber
CountDragItemFlavors GetFlavorType
GetFlavorFlags GetFlavorDataSize
GetFlavorData GetDragItemBounds
SetDragItemBounds
Getting and Drag Status Information
GetDragAttributes GetDragMouse
SetDragMouse GetDragOrigin
GetDragModifiers GetDropLocation
SetDropLocation
Window Highlighting Utilities
ShowDragHilite HideDragHilite
DragPreScroll DragPostScroll
UpdateDragHilite
Drag Manager Utilities
WaitMouseMoved ZoomRects
ZoomRegion
TextEdit Utilities
TEGetHiliteRgn
【関連項目】
【Inside Macintosh】
#
#
#
/***DragReference***/ ItemReference FlavorFlags DragAttributes FlavorType flavorTypeHFS flavorTypePromiseHFS flavorTypeDirectory HFSFlavor PromiseHFSFlavor DragManager
DragReference(2n)
【名前】
DragReference - data type (unsigned long)
ItemReference - data type (unsigned long)
FlavorFlags - data type (unsigned long)
DragAttributes - data type (unsigned long)
FlavorType - data type (ResType = long)
HFSFlavor - data type
PromiseHFSFlavor - data type
【形式】
■基本データタイプ
DragReference unsigned long
ItemReference unsigned long
FlavorFlags unsigned long
0x00000001L flavorSenderOnly
0x00000002L flavorSenderTranslated
0x00000004L flavorNotSaved
0x00000100L flavorSystemTranslated
DragAttributes unsigned long
0x00000001L dragHasLeftSenderWindow
0x00000002L dragInsideSenderApplication
0x00000004L dragInsideSenderWindow
FlavorType ResType
■flavor データタイプ
'hfs ' flavorTypeHFS
'phfs' flavorTypePromiseHFS
'diry' flavorTypeDirectory
HFSFlavor
OSType fileType;
OSType fileCreator;
unsigned short fdFlags;
FSSpec fileSpec;
PromiseHFSFlavor
OSType fileType;
OSType fileCreator;
unsigned short fdFlags;
FlavorType promisedFlavor;
/***InstallTrackingHandler***/ InstallReceiveHandler RemoveTrackingHandler RemoveReceiveHandler DragTrackingMessage DragManager
InstallTrackingHandler(2n)
【名前】
InstallTrackingHandler - Trackingハンドラの登録
InstallReceiveHandler - Receive ハンドラの登録
RemoveTrackingHandler - Trackingハンドラの削除
RemoveReceiveHandler - Receive ハンドラの削除
DragTrackingMessage - data type (short)
【書式】
#include <Drag.h>
OSErr InstallTrackingHandler(DragTrackingHandler trackingHandler,
WindowPtr theWindow, void *handlerRefCon);
OSErr InstallReceiveHandler(DragReceiveHandler receiveHandler,
WindowPtr theWindow, void *handlerRefCon);
OSErr RemoveTrackingHandler(DragTrackingHandler trackingHandler,
WindowPtr theWindow);
OSErr RemoveReceiveHandler(DragReceiveHandler receiveHandler,
WindowPtr theWindow);
【Trackingハンドラ】
ウインドウの マウスが入ってきた時の処理(Tracking)
pascal OSErr (*DragTrackingHandlerProcPtr)(
DragTrackingMessage message,
WindowPtr theWindow,
void *handlerRefCon,
DragReference theDragRef);
戻り値 特に意味なし(noErr を返す)
DragTrackingMessage short <<トラッキングの種別>>
1 dragTrackingEnterHandler
2 dragTrackingEnterWindow
3 dragTrackingInWindow
4 dragTrackingLeaveWindow
5 dragTrackingLeaveHandler
【Receiveハンドラ】
データの受信(Receive)処理
pascal OSErr (*DragReceiveHandlerProcPtr)(
WindowPtr theWindow,
void *handlerRefCon,
DragReference theDragRef);
戻り値 noErr 受信 OK
その他 受信キャンセル(TrackDrag() の戻り値 userCanceledErr)
【サンプル】
1. 登録
WindowPtr wind;
wind = GetNewWindow(...);
InstallTrackingHandler(
InstallReciverHandler(
2. 破棄
RemoveTrackingHandler(
RemoveReciverHandler(
DisposeWindow(
###
/***NewDrag***/ DisposeDrag DragManager
NewDrag(2n)
【名前】
NewDrag -
DisposeDrag -
【書式】
#include <Drag.h>
OSErr NewDrag(DragReference *theDragRef);
OSErr DisposeDrag(DragReference theDragRef);
/***AddDragItemFlavor***/ SetDragItemFlavorData DragManager
AddDragItemFlavor(2n)
【名前】
AddDragItemFlavor -
SetDragItemFlavorData -
【書式】
#include <Drag.h>
OSErr AddDragItemFlavor(DragReference theDragRef,
ItemReference theItemRef,
FlavorType theType, void *dataPtr,
Size dataSize, FlavorFlags theFlags);
OSErr SetDragItemFlavorData(DragReference theDragRef,
ItemReference theItemRef, FlavorType theType,
const void *dataPtr, Size dataSize,
unsigned long dataOffset);
/***SetDragSendProc***/ SetDragInputProc SetDragDrawingProc DragRegionMessage DragManager
SetDragSendProc(2n)
【名前】
SetDragSendProc -
SetDragInputProc -
SetDragDrawingProc -
DragRegionMessage - data type (short)
【書式】
#include <Drag.h>
OSErr SetDragSendProc(DragReference theDragRef,
DragSendDataProc sendProc, void *dragSendRefCon);
OSErr SetDragInputProc(DragReference theDragRef,
DragInputProc inputProc, void *dragInputRefCon);
OSErr SetDragDrawingProc(DragReference theDragRef,
DragDrawingProc drawingProc, void *dragDrawingRefCon);
【Receiveハンドラ】
pascal OSErr (*DragSendDataProcPtr)(
FlavorType theType,
void *dragSendRefCon,
ItemReference theItemRef,
DragReference theDragRef);
【Receiveハンドラ】
pascal OSErr (*DragInputProcPtr)(
Point *mouse,
short *modifiers,
void *dragInputRefCon,
DragReference theDragRef);
【Receiveハンドラ】
pascal OSErr (*DragDrawingProcPtr)(
DragRegionMessage message,
RgnHandle showRegion,
Point showOrigin,
RgnHandle hideRegion,
Point hideOrigin,
void *dragDrawingRefCon,
DragReference theDragRef);
DragRegionMessage short <<ドラッグRegionメッセージ>>
1 dragRegionBegin
2 dragRegionDraw
3 dragRegionHide
4 dragRegionIdle
5 dragRegionEnd
/***TrackDrag***/ DragManager
TrackDrag(2n)
【名前】
TrackDrag -
【書式】
#include <Drag.h>
OSErr TrackDrag(DragReference theDragRef,
const EventRecord *theEvent, RgnHandle theRegion);
/***CountDragItems***/ GetDragItemReferenceNumber CountDragItemFlavors GetFlavorType GetFlavorFlags GetFlavorDataSize GetFlavorData GetDragItemBounds SetDragItemBounds DragManager
CountDragItems(2n)
【名前】
CountDragItems - Dragデータの総アイテム数の取得
GetDragItemReferenceNumber - アイテム番号から reference番号を取得
CountDragItemFlavors - 指定flavorタイプのデータ数を取得
GetFlavorType - flavorタイプの取得
GetFlavorFlags - flavorフラグの取得
GetFlavorDataSize - flavorサイズの取得
GetFlavorData - flavorデータの取得
GetDragItemBounds - アイテム bounds の取得
SetDragItemBounds - アイテム bounds の設定
【書式】
#include <Drag.h>
OSErr CountDragItems(DragReference theDragRef,
unsigned short *numItems);
OSErr GetDragItemReferenceNumber(DragReference theDragRef,
unsigned short index, ItemReference *theItemRef);
OSErr CountDragItemFlavors(DragReference theDragRef,
ItemReference theItemRef, unsigned short *numFlavors);
OSErr GetFlavorType(DragReference theDragRef,
ItemReference theItemRef, unsigned short index,
FlavorType *theType);
OSErr GetFlavorFlags(DragReference theDragRef,
ItemReference theItemRef, FlavorType theType,
FlavorFlags *theFlags);
OSErr GetFlavorDataSize(DragReference theDragRef,
ItemReference theItemRef, FlavorType theType,
Size *dataSize);
OSErr GetFlavorData(DragReference theDragRef,
ItemReference theItemRef, FlavorType theType,
void *dataPtr, Size *dataSize,
unsigned long dataOffset);
OSErr GetDragItemBounds(DragReference theDragRef,
ItemReference theItemRef,
Rect *itemBounds);
OSErr SetDragItemBounds(DragReference theDragRef,
ItemReference theItemRef,
const Rect *itemBounds);
/***GetDragAttributes***/ GetDragMouse SetDragMouse GetDragOrigin GetDragModifiers GetDropLocation SetDropLocation DragManager
GetDragAttributes(2n)
【名前】
GetDragAttributes -
GetDragMouse -
SetDragMouse -
GetDragOrigin -
GetDragModifiers - モディファイアキー状態の取得
GetDropLocation -
SetDropLocation -
【書式】
#include <Drag.h>
OSErr GetDragAttributes(DragReference theDragRef,
DragAttributes *flags);
OSErr GetDragMouse(DragReference theDragRef,
Point *mouse, Point *pinnedMouse);
OSErr SetDragMouse(DragReference theDragRef, Point pinnedMouse);
OSErr GetDragOrigin(DragReference theDragRef, Point *initialMouse);
OSErr GetDragModifiers(DragReference theDragRef,
short *modifiers, 現在
short *mouseDownModifiers, マウスダウン時
short *mouseUpModifiers); マウスアップ時
OSErr GetDropLocation(DragReference theDragRef, AEDesc *dropLocation);
OSErr SetDropLocation(DragReference theDragRef,
const AEDesc *dropLocation);
/***ShowDragHilite***/ HideDragHilite DragPreScroll DragPostScroll UpdateDragHilite DragManager
ShowDragHilite(2n)
【名前】
ShowDragHilite - Show ハイライト
HideDragHilite - Hide ハイライト
DragPreScroll -
DragPostScroll -
UpdateDragHilite -
【書式】
#include <Drag.h>
OSErr ShowDragHilite(DragReference theDragRef,
RgnHandle hiliteFrame, Boolean inside);
OSErr HideDragHilite(DragReference theDragRef);
OSErr DragPreScroll(DragReference theDragRef, short dH, short dV);
OSErr DragPostScroll(DragReference theDragRef);
OSErr UpdateDragHilite(DragReference theDragRef, RgnHandle updateRgn);
/***WaitMouseMoved***/ ZoomRects ZoomRegion TEGetHiliteRgn ZoomAcceleration DragManager
WaitMouseMoved(2n)
【名前】
WaitMouseMoved -
ZoomRects -
ZoomRegion -
TEGetHiliteRgn -
ZoomAcceleration - data type(short)
【書式】
#include <Drag.h>
Boolean WaitMouseMoved(Point initialMouse);
OSErr ZoomRects(const Rect *fromRect, const Rect *toRect,
short zoomSteps, ZoomAcceleration acceleration);
OSErr ZoomRegion(RgnHandle region, Point zoomDistance,
short zoomSteps, ZoomAcceleration acceleration);
OSErr TEGetHiliteRgn(RgnHandle region, TEHandle hTE);
【定義】
ZoomAcceleration short
0 zoomNoAcceleration
1 zoomAccelerate
2 zoomDecelerate